package ru.xeden.web.html.page;

import java.io.PrintWriter;

import ru.xeden.web.html.RenderContext;
import ru.xeden.web.html.dom.INode;


public class PageImpl
    implements IPage
{
    private INode rootElement;

    public PageImpl()
    {
    }

    public void setRootNode(INode node)
    {
        rootElement = node;
    }

    public void toMarkup(RenderContext markupContext, PrintWriter writer)
    {
        if (rootElement == null)
        {
            return;
        }
        rootElement.toMarkup(markupContext, writer);
    }

    public INode getRootElement()
    {
        return rootElement;
    }
}
